package com.unitd.base.module.api.service;

import com.unitd.base.module.api.mybatis.mapper.ApiBrandMapper;
import com.unitd.base.module.api.entity.BrandVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ApiBrandService {
    @Autowired
    private ApiBrandMapper brandDao;

    public BrandVo queryObject(Integer id) {
        return brandDao.selectById(id);
    }

    public List<BrandVo> queryList(Map<String, Object> map) {
        return brandDao.selectByMap(map);
    }

    public int queryTotal(Map<String, Object> map) {
        return brandDao.queryTotal(map);
    }

    public void save(BrandVo brand) {
        brandDao.insert(brand);
    }

    public void update(BrandVo brand) {
        brandDao.updateById(brand);
    }

    public void delete(Integer id) {
        brandDao.deleteById(id);
    }
}
